<?php
class Ext_Tracker_EnqueueMessage extends Ext_Message 
{
    const VERSION = '1.0';
    public function __construct( $msg = null ) 
    {
        $this->getData( $msg );
    }
    public function getData( $msg = null ) 
    {
        $data = parent::getData( $msg );
        if( $data != null ) {
            // Validate the message somehow.
            if( ! isset( $data[ 'version' ] ) || $data[ 'version' ] != 
                Ext_Tracker_EnqueueMessage::VERSION ) {
                throw new Exception( 'Event Message Invalid Version' );
            }
        } else { // Initialize Data.
            $data = array( 'version' => Ext_Tracker_EnqueueMessage::VERSION );
            parent::setData( $data );
        }
        return $data;
    }
}